@include b(result) {
  --content-font: #{font-song()};
  --panel-width: 600px;

  all: unset;
  box-sizing: border-box;
  position: absolute;
  z-index: 9999;
  display: flex;
  text-align: initial;
  flex-flow: column;
  max-width: var(--panel-width);
  min-width: var(--panel-width);
  padding: 15px 25px 12px;
  color: #111;
  background: #fff;
  border-radius: 6px;
  contain: layout;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  box-shadow: 0 12px 45px 0 rgba(0, 0, 0, 0.12);

  &.hei {
    --content-font: #{font-hei()};
  }

  &.kai {
    --content-font: #{font-kai()};
  }

  @include when(input--visible) {
    max-height: calc(50vh - 100px) !important;
    position: fixed;
    left: 50% !important;
    top: 35% !important;
    transform: translate(-50%, 100px) !important;
  }
  @include when(dialog) {
    --panel-width: 650px;
    
    position: relative;
    margin: auto;
    box-shadow: 0 0 0 50vw rgba(0, 0, 0, 0.4), 0 2px 28px 0 rgba(137, 137, 137, 0.67);

    @include e(word) {
      font-size: 25px;
    }

    @include e(english eg) {
      font-size: 17px;
    }
  }

  * {
    box-sizing: border-box;
  }

  @include m(invisible) {
    opacity: 0;
  }

  @include e(origin) {
    all: unset;
    margin-bottom: 5px;
  }

  @include e(meta) {
    max-width: 100%;
    display: flex;
    flex-wrap: wrap;
    flex-shrink: 0;
    align-items: center;
    overflow: hidden;
  }

  @include e(word) {
    all: unset;
    display: -webkit-box;
    max-width: 50%;
    margin: 0;
    padding-right: 20px;
    font-weight: bold;
    flex-shrink: 0;
    font-size: 18px;
    overflow: hidden;
    user-select: none;
    line-height: normal;
    text-overflow: ellipsis;
    word-break: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    @include font-old;

    @include m(sentence) {
      max-width: 100%;
      font-size: 16px;
    }
  }

  @include e(pronunciation) {
    all: unset;
    display: flex;
    flex-shrink: 0;
    align-items: center;
    padding-right: 10px;
    cursor: pointer;
  }

  @include e(flag) {
    all: unset;
    width: 20px;
    height: 10px;
    margin-right: 5px;
    background-repeat: no-repeat;
    background-size: 100% auto;
    background-position: 0 center;

    @include m(uk) {
      background-image: url('chrome-extension://__MSG_@@extension_id__/assets/uk.png');
    }

    @include m(usa) {
      background-image: url('chrome-extension://__MSG_@@extension_id__/assets/usa.png');
    }
  }

  @include e(phonetic) {
    all: unset;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
    font-family: font-hei();
    font-weight: normal;
  }

  @include e(audio) {
    display: none;
  }

  @include e(star) {
    all: unset;
    position: absolute !important;
    top: 15px;
    right: 15px;
    cursor: pointer;
    background-color: #fff;

    @include m(ed) {
      color: mix($primary, white, 80);
    }
  }

  @include e(oxford) {
    all: unset;
    margin-right: -25px;
    margin-bottom: 4px;
    padding-right: 25px;
    flex-grow: 1;
    overflow-y: auto;
    @include scroll-bar;

    @include spec-selector('+', simple) {
      all: unset;
      margin-top: 10px;
    }
  }

  @include e(class) {
    all: unset;
    display: flex;
    align-items: flex-start;

    &:not(:last-child) {
      margin-bottom: 12px;
    }
  }

  @include e(type) {
    all: unset;
    @include font-old;

    width: 38px;
    white-space: nowrap;
    padding-right: 10px;
    flex-shrink: 0;
    flex-grow: 0;
    font-weight: bold;
    font-size: 14px;
    line-height: 16px;
  }

  @include e('item-wrap') {
    all: unset;
    flex-basis: 100%;
  }

  @include e(item) {
    all: unset;
    position: relative;
    display: flex;
    flex-basis: 100%;
    font-size: 14px;
    align-items: center;
    flex-wrap: wrap;
    font-family: var(--content-font);
    margin-left: -10px;
    padding-left: 10px;

    &:hover {
      background: rgba(200, 200, 200, 0.1);
    }

    &:not(:last-child) {
      padding-bottom: 10px;
      margin-bottom: 8px;
    }

    &::after {
      line-height: 12px;
    }

    @for $i from 1 through 3 {
      @include m($i) {
        &:nth-child(n + #{$i + 1}) {
          display: none;
        }

        &:nth-of-type(#{$i}):not(:last-of-type) {
          &::after {
            content: '...';
          }
        }
      }
    }
  }

  @include e(english) {
    all: unset;
    line-height: 1.2;
    font-size: 15px;
    padding-right: 10px;
  }

  @include e(simple) {
    all: unset;
  }

  @include e(chinese) {
    all: unset;
    display: block;
    font-size: 13px;
    font-family: var(--content-font);

    @include m(simple) {
      font-size: 16px;
    }

    @include m(brief) {
      width: 100%;
      max-width: 100%;
      height: 20px;
      margin-top: 2px;
      flex-shrink: 1;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
  }

  @include e(eg) {
    all: unset;
    width: 100%;
    line-height: 1.1;
    color: $accent;
  }

  @include e(more) {
    --button-color: #ccc;
    --line-color: #eee;

    all: unset;
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 16px;
    margin-bottom: 12px;
    padding: 7px 0 8px;
    color: #ddd;
    cursor: pointer;

    &::after {
      content: '';
      display: block;
      width: 100%;
      border-bottom: 1px solid var(--line-color);
    }

    &:hover {
      --button-color: #333;
      --line-color: #ccc;
    }
  }

  @include e('more-button') {
    position: absolute;
    top: 0;
    left: 50%;
    display: flex;
    width: 16px;
    height: 16px;
    margin: unset;
    padding: unset;
    border: unset;
    outline: unset;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 0 0 5px #fff;

    &::after {
      content: '';
      margin: auto;
      display: block;
      width: 6px;
      height: 6px;
      border-color: transparent var(--button-color) var(--button-color) transparent;
      border-width: 1px;
      border-style: solid;
      transform: rotate(45deg) txy(-1px, -1px);
    }

    @include m(expanded) {
      &::after {
        transform: rotate(225deg) txy(-1px, -1px);
      }
    }
  }

  @include e(footer) {
    display: flex;
    width: unset;
    height: unset;
    margin: unset;
    padding: unset;
    border: unset;
    outline: unset;
    border-radius: unset;
    margin-top: 15px;
    justify-content: space-between;
  }

  /* 词根按钮 */
  @include e(ex-link) {
    width: unset;
    height: unset;
    margin: unset;
    padding: unset;
    border: unset;
    outline: unset;
    color: #aaa;
    border-radius: unset;
    text-decoration: underline;
    box-shadow: none;
    @include font-normal;
    font-size: 12px;

    &:hover {
      color: $primary;
    }

    &:visited {
      color: #aaa;
    }

    & + & {
      margin-left: 10px;
    }

    &.__is-error {
      color: rgb(250, 77, 77);
    }
  }

  @include e('fonts-select') {
    display: flex;
    width: unset;
    height: unset;
    margin: unset;
    padding: unset;
    border: unset;
    outline: unset;
    border-radius: unset;
  }

  @include e(font) {
    width: unset;
    height: unset;
    margin: unset;
    padding: unset;
    border: unset;
    outline: unset;
    border-radius: unset;
    cursor: pointer;
    color: #ddd;
    padding: 3px;
    font-size: 12px;
    margin-left: 3px;

    &:hover,
    &.active {
      color: $primary;
    }

    &.song {
      font-family: #{font-song()};
    }

    &.kai {
      font-family: #{font-kai()};
    }

    &.hei {
      font-family: #{font-hei()};
    }
  }

  @include e(error) {
    width: unset;
    height: unset;
    margin: unset;
    padding: unset;
    border: unset;
    outline: unset;
    border-radius: unset;
    font-size: 12px;
    color: rgb(245, 51, 51);
  }
}
